from direct.showbase.ShowBase import ShowBase

from direct.actor.Actor import Actor
 
class MyApp(ShowBase):
 
    def __init__(self):
        ShowBase.__init__(self)
        # Load the environment model.
        #self.environ = self.loader.loadModel("models/environment")
        #self.environ = self.loader.loadModel("humainvert3.egg")
        self.environ = Actor("humainvert3salut",
                                 {"salut":"humainvert3salut-salut"})
        
        #self.environ = Actor("ralph",
        #                         {"run":"ralph-run",
        #                          "walk":"ralph-walk"})
        print self.environ
        # Reparent the model to render.
        self.environ.reparentTo(self.render)
        # Apply scale and position transforms on the model.
        self.environ.setScale(1, 1, 1)
        self.environ.setPos(0, 42, 0)
        self.environ.setColor(0.6, 0.6, 1.0, 1.0)
        #taskMgr.self.environ.loop("salut")
        taskMgr.add(self.saluer,"salut")
    def saluer(self,task):
        print("OK")
        self.environ.loop("salut")
        return #task.cont

app = MyApp()
app.run()

